﻿namespace Example.Creational.StaticFactory
{
    using System;

    public abstract class Gender
    {
        public static Gender FromString(string value)
        {
            var type = Type.GetType("Example.Creational.StaticFactory." + value);

            return (Gender)Activator.CreateInstance(type);
        }
    }
}